package com.demo.juc.state;

/**
 * 线程状态测试：
 *
 * TIMED_WATING : TimeUnit.SECONDS.sleep(seconds);
 * WAITING: WaitingState.class.wait();
 * BLOCKED: TimeUnit.SECONDS.sleep(seconds);  两个线程
 *
 */
public class ThreadStateMain {

    public static void main(String[] args) {
        //new Thread(new WaitingTimeThread(), "WaitingTimeThread").start();

        //new Thread(new WaitingThread(), "WaitingThread").start();

        //BlockedThread_01线程会抢到锁，BlockedThread_02线程会阻塞
        new Thread(new BlockedThread(), "BlockedThread_01").start();
        new Thread(new BlockedThread(), "BlockedThread_02").start();


    }
}
